;/******************************************************************************
;**
;**  SRC-MODULE: BLU.cfg
;**
;**  TARGET    : SWE-Generator
;**
;**  PURPOSE   : SWE-Generator configuration file for BLU SWE
;**
;**  REMARKS   : automatically generated from ECUC
;**
;**  PLATFORM DEPENDENT [yes/no]: yes
;**
;**  TO BE CHANGED BY USER [yes/no]: yes
;**
;******************************************************************************/

; Open output file
OPEN BTLD

; 2 => 3 byte addresses, 3 => 4 byte addresses
SET_SREC_FORMAT 3 20

; Create additional block info in output file
CREATE_DATA_BLOCK_INFOS

; Set SGBM identifier
SET_IDENTIFIER btld_000064bd_001_000_000

; Set SWEDevelopmentInfo
SET_DEVELOPMENT_INFO_FIELD TEXT SWEGEN-BLU



; Load the (signed) bootloader
READ_BLOCK_FROM_FILE %2 00008000 0000ffff 1B SIGN
MOVE_BLOCK              00008000 0000ffff 00090000
READ_BLOCK_FROM_FILE %2 00010000 00017fff 1B SIGN
MOVE_BLOCK              00010000 00017fff 00098000
READ_BLOCK_FROM_FILE %2 00018000 0001ffff 1B SIGN
MOVE_BLOCK              00018000 0001ffff 000a0000
READ_BLOCK_FROM_FILE %2 00020000 00027fff 1B SIGN
MOVE_BLOCK              00020000 00027fff 000a8000
READ_BLOCK_FROM_FILE %2 00028000 0002ffff 1B SIGN
MOVE_BLOCK              00028000 0002ffff 000b0000
READ_BLOCK_FROM_FILE %2 00030000 00037fff 1B SIGN
MOVE_BLOCK              00030000 00037fff 000b8000
READ_BLOCK_FROM_FILE %2 00038000 0003ffff 1B SIGN
MOVE_BLOCK              00038000 0003ffff 000c0000
READ_BLOCK_FROM_FILE %2 00040000 00047fff 1B SIGN
MOVE_BLOCK              00040000 00047fff 000c8000
READ_BLOCK_FROM_FILE %2 00048000 0004ffff 1B SIGN
MOVE_BLOCK              00048000 0004ffff 000d0000
READ_BLOCK_FROM_FILE %2 00050000 00057fff 1B SIGN
MOVE_BLOCK              00050000 00057fff 000d8000


; Load blocks
READ_BLOCK_FROM_FILE %1 00058000 0005ffff B0 SIGN
READ_BLOCK_FROM_FILE %1 00060000 00067fff B1 SIGN
READ_BLOCK_FROM_FILE %1 00068000 0006ffff B2 SIGN
READ_BLOCK_FROM_FILE %1 00070000 00077fff B3 SIGN
READ_BLOCK_FROM_FILE %1 00078000 0007ffff B4 SIGN
READ_BLOCK_FROM_FILE %1 00080000 00087fff B5 SIGN
READ_BLOCK_FROM_FILE %1 00088000 0008ffff B6 SIGN
READ_BLOCK_FROM_FILE %1 000e0000 000e7fff B7 SIGN
READ_BLOCK_FROM_FILE %1 000e8000 000effff B8 SIGN
READ_BLOCK_FROM_FILE %1 000f0000 000f7fff B9 SIGN
READ_BLOCK_FROM_FILE %1 000f8000 000ff91b Ba SIGN
READ_BLOCK_FROM_FILE %1 000ff91c 000fffff Bb NOSIGN


; Create output blocks
CREATE_OUTPUT_BLOCK 00058000 0005ffff  COMPRESS_NRV
CREATE_OUTPUT_BLOCK 00060000 00067fff  COMPRESS_NRV
CREATE_OUTPUT_BLOCK 00068000 0006ffff  COMPRESS_NRV
CREATE_OUTPUT_BLOCK 00070000 00077fff  COMPRESS_NRV
CREATE_OUTPUT_BLOCK 00078000 0007ffff  COMPRESS_NRV
CREATE_OUTPUT_BLOCK 00080000 00087fff  COMPRESS_NRV
CREATE_OUTPUT_BLOCK 00088000 0008ffff  COMPRESS_NRV
CREATE_OUTPUT_BLOCK 00090000 00097fff  COMPRESS_NRV
CREATE_OUTPUT_BLOCK 00098000 0009ffff  COMPRESS_NRV
CREATE_OUTPUT_BLOCK 000a0000 000a7fff  COMPRESS_NRV
CREATE_OUTPUT_BLOCK 000a8000 000affff  COMPRESS_NRV
CREATE_OUTPUT_BLOCK 000b0000 000b7fff  COMPRESS_NRV
CREATE_OUTPUT_BLOCK 000b8000 000bffff  COMPRESS_NRV
CREATE_OUTPUT_BLOCK 000c0000 000c7fff  COMPRESS_NRV
CREATE_OUTPUT_BLOCK 000c8000 000cffff  COMPRESS_NRV
CREATE_OUTPUT_BLOCK 000d0000 000d7fff  COMPRESS_NRV
CREATE_OUTPUT_BLOCK 000d8000 000dffff  COMPRESS_NRV
CREATE_OUTPUT_BLOCK 000e0000 000e7fff  COMPRESS_NRV
CREATE_OUTPUT_BLOCK 000e8000 000effff  COMPRESS_NRV
CREATE_OUTPUT_BLOCK 000f0000 000f7fff  COMPRESS_NRV
CREATE_OUTPUT_BLOCK 000f8000 000fffff  COMPRESS_NRV

;                                      or NOCOMPRESS

; Signing data
SET_SIGNATURE_BYTE_ORDER MOTOROLA
SET_SIGNATURE_HASH_MODE  SHA256
SET_SIGNATURE_KEY_LENGTH 2048
SET_SIGNATURE_MODE	 RSA
SET_SIGNATURE_ADDRESS	 000ff91c
; Set address of development info
SET_DIF_ADDRESS 000ff908

; Signing key (only for signing with test keys)
SIGN C:\EC-Apps\ESG\SWE-Generator\Keys\official_Test_Key_Asym_2048.key

; Write description table to address of 'SweTable'
CREATE_DESCRIPTION_TABLE 000ff900

; Calculate checksum
CALCULATE_CHECKSUM CRC16 BYTE
; Close output file
CLOSE

